package com.zatech.cgnci.project.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author EDY
 * @version 1.0
 * Create by 2024/12/18 14:27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserEntity implements Serializable {

    private String userorg;
    private String username;
    private String usercode;
    private String orgname;

    public String getNameAndCode() {
        return StringUtils.join(this.username, "-", this.usercode);
    }

    public static final ConcurrentHashMap<String, UserEntity> USER_ENTITY_MAP = new ConcurrentHashMap<>();

    public static final List<UserEntity> USER_ENTITY_LIST = new ArrayList<>();

    static {
        USER_ENTITY_LIST.add(new UserEntity(null, "发起人", "P00001", null));
        USER_ENTITY_LIST.add(new UserEntity(null, "部门负责人1", "P00003-1", null));
        USER_ENTITY_LIST.add(new UserEntity(null, "部门负责人2", "P00003-2", null));
        USER_ENTITY_LIST.add(new UserEntity(null, "合规审核1", "P00004-1", null));
        USER_ENTITY_LIST.add(new UserEntity(null, "合规审核2", "P00004-2", null));
        USER_ENTITY_LIST.add(new UserEntity(null, "发起人分管领导1", "P00006-1", null));
        USER_ENTITY_LIST.add(new UserEntity(null, "发起人分管领导2", "P00006-2", null));
    }
}
